<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-user-resetPwd">
		<input name="userId"  type="hidden"  th:value="${userId}" />
		<div class="row">
			<div class="col-sm-12">
				<div class="form-group">
					<label class="col-sm-4 control-label" style="font-size: 18px">最大可分配的客户总数：</label>
					<div class="col-sm-8" style="padding-top: 7px">
						<span id="getDataCount" th:text="*{getDataCount}" style="font-size: 18px"></span>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<div class="form-group">
					<label class="col-sm-4 control-label" style="font-size: 18px">已分配的客户数：</label>
					<div class="col-sm-8" style="padding-top: 7px">
						<span id="yetCount" th:text="*{yetCount}" style="font-size: 18px"></span>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<div class="form-group">
					<label class="col-sm-4 control-label" style="font-size: 18px">分配客户数：</label>
					<div class="col-sm-8" style="padding-top: 7px">
						<input class="form-control" placeholder="请输入分配客户数" type="text" name="allotment" id="allotment" >
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript">
	// 获取最大的分配分数
	// var dataCount = $("#getDataCount").value()
	// alert(dataCount)


	// $("#form-user-resetPwd").validate({
	// 	rules:{
	// 		allotment:{
	// 			required:true,
	// 			maxlength: dataCount
	// 		},
	// 	},
	// 	focusCleanup: true
	// });

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(ctx + "system/user/resetAllotment", $('#form-user-resetPwd').serialize());
		}
	}
</script>
</body>

</html>
